﻿using System;
using System.ComponentModel;
using System.Data.Linq.Mapping;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace WPCloudPT.Model.DbModel
{
    [Table(Name = "TbFicheiros")]
    public class TbFolder : INotifyPropertyChanging
    {


        [Column(AutoSync = AutoSync.OnInsert, IsPrimaryKey = true, IsDbGenerated = true,
            DbType = "INT NOT NULL Identity", Name = "IdFicheiro")]
        private int _idPasta;
        public int IdPasta
        {
            get { return _idPasta; }
            set
            {
                if (_idPasta == value) return;
                OnPropertyChanging("UtilizadorId");
                _idPasta = value;
            }
        }

        [Column(DbType = "varchar(100)", Name = "HashFolder")] 
        private string _hashPasta;
        public string HashPasta
        {
            get { return _hashPasta; }
            set
            {
                if(_hashPasta==value)return;
                OnPropertyChanging("HashPasta");
                _hashPasta = value;
            }
        }
        #region INotifyPropertyChanging Members

        public event PropertyChangingEventHandler PropertyChanging;
        protected virtual void OnPropertyChanging(string propertyName)
        {
            var handler = PropertyChanging;
            if (handler == null) return;
            handler(this, new PropertyChangingEventArgs(propertyName));
        }
        #endregion
    }
}
